package vn.allmobile.newsreader.activities.main;

import java.util.List;

import vn.allmobile.newsreader.R;
import vn.allmobile.newsreader.adapters.LibraryAdapter;
import vn.allmobile.newsreader.data.Paper;
import vn.allmobile.newsreader.utils.Utils;
import android.app.Activity;
import android.os.Bundle;

import com.jess.ui.TwoWayGridView;

public class MainLibraryActivity extends Activity {
	TwoWayGridView mGridView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.librarypapers);
		this.mGridView = (TwoWayGridView) findViewById(R.id.library_gridview);
		List<Paper> mListPaper = Utils.getPapers(getApplicationContext());
		LibraryAdapter mAdapter = new LibraryAdapter(getApplicationContext(),
				mListPaper);
		this.mGridView.setAdapter(mAdapter);
	}

}
